code, and make visible at the command line via 'vga=current'.
Signed-off-by: Keir Fraser <keir@xensource.com>
\begin{description}
\item[ ask ] Display a vga menu allowing manual selection of video
mode.
+ \item[ current ] Use existing vga mode without modification.
\item[ text-$<$mode$>$ ] Select text-mode resolution, where mode is
one of 80x25, 80x28, 80x30, 80x34, 80x43, 80x50, 80x60.
\item[ gfx-$<$mode$>$ ] Select VESA graphics mode
call .Lstr_prefix
add $8,%esp
test %eax,%eax
- jnz .Lcmdline_exit
+ jnz .Lparse_vga_current
/* We have 'vga=mode-<mode>'. */
add $5,%ebx
call .Latoi
add $4,%esp
mov %ax,bootsym_phys(boot_vid_mode)
+ jmp .Lcmdline_exit
+
+.Lparse_vga_current:
+ /* Check for 'vga=current'. */
+ push %ebx
+ pushl $sym_phys(.Lvga_current)
+ call .Lstr_prefix
+ add $8,%esp
+ test %eax,%eax
+ jnz .Lcmdline_exit
+
+ /* We have 'vga=current'. */
+ movw $VIDEO_CURRENT_MODE,bootsym_phys(boot_vid_mode)
.Lcmdline_exit:
popa
.asciz "gfx-"
.Lvga_mode:
.asciz "mode-"
+.Lvga_current:
+ .asciz "current"
.Lno_rm_opt:
.asciz "no-real-mode"
.Ledid_opt:
.word bootsym(set_8pixel)
.word bootsym(set_80x43)
.word bootsym(set_80x28)
+ .word bootsym(set_current)
.word bootsym(set_80x30)
.word bootsym(set_80x34)
.word bootsym(set_80x60)
movb $0x01, %ah # Define cursor scan lines 11-12
movw $0x0b0c, %cx
int $0x10
+set_current:
stc
ret
#define VIDEO_80x50 0x0f01
#define VIDEO_80x43 0x0f02
#define VIDEO_80x28 0x0f03
-#define VIDEO_80x30 0x0f04
-#define VIDEO_80x34 0x0f05
-#define VIDEO_80x60 0x0f06
-#define VIDEO_LAST_SPECIAL 0x0f07
+#define VIDEO_CURRENT_MODE 0x0f04
+#define VIDEO_80x30 0x0f05
+#define VIDEO_80x34 0x0f06
+#define VIDEO_80x60 0x0f07
+#define VIDEO_LAST_SPECIAL 0x0f08
#define ASK_VGA 0xfffd
#define VIDEO_VESA_BY_SIZE 0xffff
* 'vga=ask':
* display a vga menu of available modes
*
+ * 'vga=current':
+ * use the current vga mode without modification
+ *
* 'vga=text-80x<rows>':
* text mode, where <rows> is one of {25,28,30,34,43,50,60}
*